package org.create.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import static org.create.bean.Constants.*;

public class DateTool {

    public static String DateFormat(Date date) {
        return DateFormat(date, YMD);
    }

    public static String DateFormat(Date date, String pattern) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
        return simpleDateFormat.format(date);
    }
}
